package chapter2.config;




import chapter2.entity.User;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import three.lib.OtherUser;

@Configuration
@ComponentScan("chapter2.*")
public class AppConfig {

    @Bean
    public User setUser()
    {
        User user=new User();
        user.setAge(10);
        user.setUserName("Ken test 1");
        return user;
    }

    @Bean
    public OtherUser setOtherUser()
    {
        OtherUser user=new OtherUser();
        user.setAge(10);
        user.setUserName("Ken test other user");
        return user;
    }
}
